/*
 * Copyright (c) 2020-2099 the original author or authors. All rights reserve.
 */
package org.tianyun.cloud.dashboard.rabbit;

import org.tianyun.cloud.amqp.rabbitmq.annotation.RabbitProducer;
import org.tianyun.cloud.amqp.rabbitmq.annotation.RoutingKey;

/**
 * 消息生产者示例
 *
 * @auther ebert_chan
 */
@RabbitProducer(exchange = "exchange.test")
public interface RabbitProducerSample {

    /**
     * 发送消息
     *
     * @param msg 消息体
     * @auther ebert_chan
     */
    @RoutingKey("test.send")
    void send(String msg);

    /**
     * 发送延迟消息
     *
     * @param msg       消息体
     * @param delayTime 延时时间，单位秒
     * @auther ebert_chan
     */
    @RoutingKey("test.delay-message")
    void sendDelayMessage(String msg, Integer delayTime);

}
